package cn.ekuma.data.ui.android.editor;

import android.content.Context;
import android.util.AttributeSet;
import cn.ekuma.data.dao.ChildEditorRecord;
import cn.ekuma.data.dao.I_ParentNode;

public abstract class AbstractChildDAOJEditor<T,K> extends AbstractDAOJEditor<T> implements ChildEditorRecord<T>,ParentNodeChangeListener<K>{
    
    public AbstractChildDAOJEditor(DirtyManager dirty, Context context,
			AttributeSet attrs) {
		super(dirty, context, attrs);
	}

	protected I_ParentNode<K> parentNode;
    protected int parentState;


    public I_ParentNode<K> getParentNode() {
        return parentNode;
    }

    public void parentNodeValueChange(int state, I_ParentNode<K> parent) {
        this.parentState=state;
        this.parentNode=parent;
    }
    
    public void setParentNode(I_ParentNode<K> parentNode) {
        this.parentNode = parentNode;
    }

    public int getParentState() {
        return parentState;
    }

    public void setParentState(int parentState) {
        this.parentState = parentState;
    }
}